<html>
<head><meta charset="utf-8"><title>process-id in events · t-compiler/wg-self-profile · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/index.html">t-compiler/wg-self-profile</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html">process-id in events</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="165801317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165801317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165801317">(May 16 2019 at 11:39)</a>:</h4>
<p>It just occurred to me that <code>Event</code> does not have a <code>process_id</code> field. We should probably fix that as soon as possible.</p>



<a name="165801398"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165801398" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> amanjeev <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165801398">(May 16 2019 at 11:40)</a>:</h4>
<p>Is this a beginner friendly task?</p>



<a name="165801497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165801497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165801497">(May 16 2019 at 11:42)</a>:</h4>
<p>It might be once we decide what the type of that field should be</p>



<a name="165801549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165801549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165801549">(May 16 2019 at 11:43)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span> what do you think about <code>process_id: Cow&lt;'a, str&gt;,</code>? Is there a reason not to make this a string?</p>



<a name="165801688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165801688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165801688">(May 16 2019 at 11:45)</a>:</h4>
<p>I'm concerned about increasing the size of <code>RawEvent</code></p>



<a name="165801732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165801732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165801732">(May 16 2019 at 11:45)</a>:</h4>
<p>I think this is the way we should store process id: <a href="https://github.com/rust-lang/measureme/issues/15" target="_blank" title="https://github.com/rust-lang/measureme/issues/15">https://github.com/rust-lang/measureme/issues/15</a></p>



<a name="165802223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165802223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165802223">(May 16 2019 at 11:52)</a>:</h4>
<p>I'm thinking only about <code>Event</code> here</p>



<a name="165802275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165802275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165802275">(May 16 2019 at 11:53)</a>:</h4>
<p>e.g. if you have a directory containing event streams from an entire cargo invocation and you want to iterate over all of them at once</p>



<a name="165802306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165802306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165802306">(May 16 2019 at 11:53)</a>:</h4>
<p>post-processing tools will be interested in which process an event came from</p>



<a name="165802382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165802382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165802382">(May 16 2019 at 11:54)</a>:</h4>
<p>unless you think that post-processing should handle this differently</p>



<a name="165802403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165802403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165802403">(May 16 2019 at 11:55)</a>:</h4>
<p>e.g. handle events from one process at a time</p>



<a name="165802641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165802641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165802641">(May 16 2019 at 11:58)</a>:</h4>
<p>my vision was (roughly):</p>
<ul>
<li>don't touch RawEvent</li>
<li>store the process id in the metadata as described in the issue you linked about</li>
<li>add <code>process_id</code> to <code>Event</code></li>
<li>make the event iterator fetch the process id once and provide it with every <code>Event</code></li>
</ul>



<a name="165802804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165802804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165802804">(May 16 2019 at 12:00)</a>:</h4>
<p>Nope, that's exactly what I was thinking as well <span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span></p>



<a name="165802859"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165802859" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165802859">(May 16 2019 at 12:01)</a>:</h4>
<p>OK, then <span class="user-mention" data-user-id="218647">@Amanjeev Sethi</span> could take a stab at implementing this, if they are interested, right?</p>



<a name="165802868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165802868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165802868">(May 16 2019 at 12:01)</a>:</h4>
<p>Absolutely!</p>



<a name="165802965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165802965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> amanjeev <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165802965">(May 16 2019 at 12:03)</a>:</h4>
<p>sure! should i be creating a new gh ?issue</p>



<a name="165802985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165802985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165802985">(May 16 2019 at 12:03)</a>:</h4>
<p>I'll do that and I'll add some mentoring instructions</p>



<a name="165803061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> amanjeev <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803061">(May 16 2019 at 12:04)</a>:</h4>
<p>appreciate that!</p>



<a name="165803064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803064">(May 16 2019 at 12:04)</a>:</h4>
<p>The first step will be to implement <a href="https://github.com/rust-lang/measureme/issues/15" target="_blank" title="https://github.com/rust-lang/measureme/issues/15">https://github.com/rust-lang/measureme/issues/15</a></p>



<a name="165803224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803224">(May 16 2019 at 12:07)</a>:</h4>
<p>I added some notes to <a href="https://github.com/rust-lang/rust/issues/15" target="_blank" title="https://github.com/rust-lang/rust/issues/15">#15</a></p>



<a name="165803247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803247">(May 16 2019 at 12:07)</a>:</h4>
<p>Oh, <span class="user-mention" data-user-id="124287">@mw</span> if you want to create a new issue, that's fine too. I can remove my comment.</p>



<a name="165803249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803249">(May 16 2019 at 12:07)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span> I imagine the metadata to be a JSON object with some mandatory fields (at least process-id) and then an arbitrary number of other (string -&gt; string) pairs</p>



<a name="165803317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803317">(May 16 2019 at 12:08)</a>:</h4>
<p>do we want any other mandatory fields?</p>



<a name="165803321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803321">(May 16 2019 at 12:08)</a>:</h4>
<p>I think <code>start_time</code> should be mandatory as well</p>



<a name="165803329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803329">(May 16 2019 at 12:08)</a>:</h4>
<p>OK, in what format?</p>



<a name="165803332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803332">(May 16 2019 at 12:09)</a>:</h4>
<p>if we could stick the command run in there, that'd be good (but maybe not a required field)</p>



<a name="165803477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803477">(May 16 2019 at 12:09)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> yeah, that sounds like a good idea</p>



<a name="165803555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803555">(May 16 2019 at 12:10)</a>:</h4>
<p>what format do we store other timestamps in btw?? :)</p>



<a name="165803569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803569">(May 16 2019 at 12:10)</a>:</h4>
<p>We lean on what serde does</p>



<a name="165803585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803585">(May 16 2019 at 12:11)</a>:</h4>
<p>Which is <code>{ "seconds": u64, "nanos": u32 }</code> I believe</p>



<a name="165803600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803600">(May 16 2019 at 12:11)</a>:</h4>
<p>hm, but this would probably be more useful as a absolute timestamp?</p>



<a name="165803604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803604">(May 16 2019 at 12:12)</a>:</h4>
<p>maybe that's also recorded like that though</p>



<a name="165803659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803659">(May 16 2019 at 12:12)</a>:</h4>
<p>Oh, I think at the moment all our profiles start on 1/1/1970 :P</p>



<a name="165803672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803672">(May 16 2019 at 12:12)</a>:</h4>
<p><a href="https://github.com/serde-rs/serde/blob/5fcdf0ff2be83fc73e29d73ea69674f10e791ebc/serde/src/ser/impls.rs#L608" target="_blank" title="https://github.com/serde-rs/serde/blob/5fcdf0ff2be83fc73e29d73ea69674f10e791ebc/serde/src/ser/impls.rs#L608">https://github.com/serde-rs/serde/blob/5fcdf0ff2be83fc73e29d73ea69674f10e791ebc/serde/src/ser/impls.rs#L608</a></p>



<a name="165803706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803706">(May 16 2019 at 12:13)</a>:</h4>
<p><a href="https://github.com/rust-lang/measureme/blob/582b99b5c6c03411076a3c8950630fff380a799a/measureme/src/profiling_data.rs#L80-L81" target="_blank" title="https://github.com/rust-lang/measureme/blob/582b99b5c6c03411076a3c8950630fff380a799a/measureme/src/profiling_data.rs#L80-L81">https://github.com/rust-lang/measureme/blob/582b99b5c6c03411076a3c8950630fff380a799a/measureme/src/profiling_data.rs#L80-L81</a></p>



<a name="165803710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803710">(May 16 2019 at 12:13)</a>:</h4>
<p>In Rust terms, I think we should record a <code>(SystemTime, Instant)</code> pair. The <code>SystemTime</code> is what will go in the JSON as the <code>start_time</code>. The <code>Instant</code> is used to measure <code>RawEvent</code> offsets from the start time.</p>



<a name="165803887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803887">(May 16 2019 at 12:16)</a>:</h4>
<p>As a maybe-helpful note, this is what perf stores in it's header: <a href="https://github.com/torvalds/linux/blob/master/tools/perf/Documentation/perf.data-file-format.txt#L58" target="_blank" title="https://github.com/torvalds/linux/blob/master/tools/perf/Documentation/perf.data-file-format.txt#L58">https://github.com/torvalds/linux/blob/master/tools/perf/Documentation/perf.data-file-format.txt#L58</a></p>



<a name="165803942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165803942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165803942">(May 16 2019 at 12:17)</a>:</h4>
<p>interesting tidbits could be available memory, CPU type, number of threads</p>



<a name="165804037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165804037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165804037">(May 16 2019 at 12:18)</a>:</h4>
<p>yes, that's true</p>



<a name="165804079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165804079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165804079">(May 16 2019 at 12:19)</a>:</h4>
<p>but at least some of that is likely relatively problematic for us to uniformly query (especially on Windows, or systems without /proc/ basically)</p>



<a name="165804144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165804144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165804144">(May 16 2019 at 12:19)</a>:</h4>
<p>yeah, I mean this can be done on a best effort basis</p>



<a name="165804146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165804146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165804146">(May 16 2019 at 12:19)</a>:</h4>
<p>and I wouldn't make them required as such -- I can open an issue linking to the perf.data format though and saying "maybe we should add these fields at some point" (memory, cpu type, and thread count being the most interesting I think)</p>



<a name="165804216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165804216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165804216">(May 16 2019 at 12:20)</a>:</h4>
<p>sgtm</p>



<a name="165804223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165804223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165804223">(May 16 2019 at 12:20)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="165804265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165804265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165804265">(May 16 2019 at 12:21)</a>:</h4>
<p>At the current time, I'm most interested in <code>start_time</code>, <code>pid</code>, and <code>process_args</code>.</p>



<a name="165804282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165804282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165804282">(May 16 2019 at 12:21)</a>:</h4>
<p><code>process_args</code> should be optional though</p>



<a name="165805277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165805277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165805277">(May 16 2019 at 12:36)</a>:</h4>
<p><a href="https://github.com/rust-lang/measureme/issues/15#issuecomment-493049088" target="_blank" title="https://github.com/rust-lang/measureme/issues/15#issuecomment-493049088">https://github.com/rust-lang/measureme/issues/15#issuecomment-493049088</a></p>



<a name="165807626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165807626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165807626">(May 16 2019 at 13:06)</a>:</h4>
<p><span class="user-mention" data-user-id="218647">@Amanjeev Sethi</span> Let me know if you have any questions regarding the instructions above</p>



<a name="165830367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165830367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> amanjeev <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165830367">(May 16 2019 at 17:31)</a>:</h4>
<p>Sorry, just got around to checking Zulip again. I have not read all the comments and discussions yet but even if I had, I am sure I will have a ton of questions, <span class="user-mention" data-user-id="124287">@mw</span>  <span aria-label="smiley" class="emoji emoji-1f603" role="img" title="smiley">:smiley:</span></p>



<a name="165838776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165838776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> amanjeev <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165838776">(May 16 2019 at 19:00)</a>:</h4>
<p>Is issue <a href="https://github.com/rust-lang/measureme/issues/15" target="_blank" title="https://github.com/rust-lang/measureme/issues/15">#15</a> is what I am supposed to work or is that issue just to point me to <a href="https://github.com/rust-lang/measureme/issues/15#issuecomment-493049088" target="_blank" title="https://github.com/rust-lang/measureme/issues/15#issuecomment-493049088">this comment</a> ? Please advise.</p>



<a name="165839497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/process-id%20in%20events/near/165839497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/process-id.20in.20events.html#165839497">(May 16 2019 at 19:06)</a>:</h4>
<p>Yeah <a href="https://github.com/rust-lang/rust/issues/15" target="_blank" title="https://github.com/rust-lang/rust/issues/15">#15</a> is what you should work on :)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>